package com.xuhai.blog19.admin.service.impl;

import com.xuhai.blog19.admin.dao.TimelineDao;
import com.xuhai.blog19.admin.entity.ArticleEntity;
import com.xuhai.blog19.admin.entity.TimelineEntity;
import com.xuhai.blog19.admin.service.TimelineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author PangJunjie
 * @Date 2023/2/11/011
 */
@Service
public class TimelineServiceImpl implements TimelineService {
    @Autowired
    private TimelineDao timelineDao;

    @Override
    public List<TimelineEntity> getTimeline() {
        return timelineDao.getTimeline();
    }

    @Override
    public List<ArticleEntity> getArticleByYear(String year) {
        return timelineDao.getArticleListByYear(year, null);
    }
}
